#pragma once

#include "Core\NervusSharedHeader.h"
#include "Render\CMesh.h"



namespace Nervus {
	namespace Render {



		class D3D9Mesh : public Mesh {
			friend class D3D9RenderSystem;

		private:
			D3D9RenderSystem* mRenderSystem;
			NERVUS_MESHTYPE mMeshType;
			LPDIRECT3DVERTEXBUFFER9 mVertexBuffer;
			LPDIRECT3DINDEXBUFFER9 mIndexBuffer;
			LPDIRECT3DTEXTURE9 mTexture;

			D3D9Mesh(void* renderSystem, vector<MeshVertex>);
			~D3D9Mesh();

			bool loadMesh();
		public:
			void renderMesh();
		};
	}
}